package cn.com.klun.tjy.other.zkUsed;

import org.apache.zookeeper.*;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;

public  class MutiopTest implements Watcher{
    String hostPort;
    static ZooKeeper zk;
    public MutiopTest(String hostPort) throws KeeperException, InterruptedException {
        this.hostPort = hostPort;
    }
    void startZk() throws IOException {
        zk = new ZooKeeper(hostPort,15000,this);
    }

//    Op deleteZnode(String z){
//       return Op.delete(z,-1);
//   }

    @Override
    public void process(WatchedEvent watchedEvent) {

    }
//    List<OpResult> results = zk.multi(Arrays.asList(deleteZnode("/a/b"),deleteZnode("/a")));
}
